package com.example.demo.time;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class TimeType {
    public static void main(String[] args) {
        Calendar currCal=Calendar.getInstance();
        int currentYear = currCal.get(Calendar.YEAR);
        int currentYear02 = currentYear-1;
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        System.out.println(currentYear);
        System.out.println(currentYear02);
        /*map.put("kssj", DateTimeUtil.getFirstDayOfYear(currentYear,sdf)+"000000");
        map.put("jssj", DateTimeUtil.getLastDayOfYear(currentYear,sdf)+"235959");*/
    }
}
